import { MockMethod } from 'vite-plugin-mock';
import { resultPageSuccess, resultSuccess } from '../_util';
import { log } from 'console';

const demoList = (() => {
  const result: any[] = [];
  for (let index = 0; index < 60; index++) {
    result.push({
      id: `${index}`,
      inventoryNumber: '@string(lower,10)',
      inventoryName: '10月15日单',
      'checkState|1': ['已审核', '未审核'],
      'inventoryState|1': ['已审核', '未审核'],
      'inventoryWay|1': ['常规盘点', '全员盘点'],
      notes: '@csentence(8,12)',
      'inventoryType|1': ['全盘', '条码管控', '数量管控'],
      createTime: '@DateTime',
      createBy: '@cname',
      // { label: '全盘', value: '0' },
      // { label: '条码管控', value: '1' },
      // { label: '数量管控', value: '2' },
    });
  }
  return result;
})();
enum Api {
  list = '/inventorymanage/inventoryManage/list',
  save = '/inventorymanage/inventoryManage/add',
  edit = '/inventorymanage/inventoryManage/edit',
  deleteOne = '/inventorymanage/inventoryManage/delete',
  deleteBatch = '/inventorymanage/inventoryManage/deleteBatch',
  importExcel = '/inventorymanage/inventoryManage/importExcel',
  exportXls = '/inventorymanage/inventoryManage/exportXls',
}
const prefix = '/jeecgboot';
export default [
  // {
  //   url: prefix + Api.list,
  //   timeout: 1000,
  //   method: 'get',
  //   response: ({ query }) => {
  //     const { page = 1, pageSize = 20 } = query;
  //     return resultPageSuccess(page, pageSize, demoList);
  //   },
  // },
] as MockMethod[];
